package ntd.util.modular.other.controller;

import cn.hutool.http.HttpUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import ntd.util.config.common.bo.ResponseBO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = {"工具中心 - http请求工具 - 模拟转发 - 可以解决跨域问题"})
@RequestMapping("http-send")
public class ControllerHttpSend {

    @GetMapping
    @ApiOperation("Get 请求")
    public ResponseBO get(String url) {
        String res = HttpUtil.get(url);
        return new ResponseBO(res);
    }
}
